1 Introduction to Grails AWS Plugin

Grails AWS plugin intends to provide most of any other reason, an EASY WAY to access and use AWS services.

Not all services are included in the plugin, you can check this guide to see what you can do and how. If you want to contribute with another service that is not implemented yet, check Section "Contributions ad Reporting Bugs" of this guide.

1.1 Installing Grails AWS Plugin

As other grails plugins you should install using install-plugin command

grails intall-plugin aws

1.2 Getting the source code

If you want to get the source code for this plugin, check Blanq Github's repository at http://github.com/blanq/grails-aws

1.3 Configuring the plugin in your application

You'll have to configure the plugin in Config.groovy to set AWS credentials and other properties specifically to each AWS service you may use.

1.3.1 Setting AWS Credentials

Setting AWS Credentials

You can set your access-key and secret-key in two different manners as below

Property-file credentials configuration

As recommended by Amazon, you can use a .properties file to handle your secret and access keys for this plugin.

You'll have to create some properties file with the content as show below:

accessKey = your-access-key
secretKey = your-secret-key

And then, you will have to tell your application in Config.groovy to read this property file:

grails {
   plugin {
      aws {
         credentials {
            properties = "/my/path/to/AwsCredentials.properties"
         }
      }
   }
}

Plain-text credentials configuration

If you don't have access to the filesystem in someway, or prefer to set the access and secret key directly in Config.groovy, you can do it this way:

grails {
   plugin {
      aws {
         credentials {
            accessKey = "your-access-key"
            secretKey = "your-secret-key"
         }
      }
   }
}

Remember, if you set a properties file, it will take priority over this way.

1.4 Gant scripts

Grails AWS Plugin brings some scripts to use in your app, all scripts names follow this rule:

aws-[service]-[operation]

So, all scripts are prefixed with 'aws', followed by its service code, and then the operation name, almost always the same operation name in the corresponding WSDL. For example, to connect with SES and check your sending email statistics (GetSendStatistics operation), you'll have to execute:

grails aws-ses-get-send-statistics

All information are printed in your screen, and when you need to interact with parameters, the script will prompt you.